package com.dy.design_pattern_study.observer_mode.dome1_coupling;

/**
 * @CreateBy zhangdingyi
 * @Date 2023-04-03
 * @Content 同事类
 */
public class StockObserver {
    private String name;
    private Secretary sub;

    public StockObserver(String name, Secretary sub) {
        this.name = name;
        this.sub = sub;
    }

    public void update() {
        System.out.println(sub.getAction() + "关闭股票行情，继续工作！ " + name);
    }
}
